// import type { RouteRecordStringComponent } from '@vben/types';

import { requestClient } from '#/api/request';

/**
 * 测试
 */



// 营养管理模块
// 获取营养素列表
export async function $getlist(data: any) {
  return requestClient.get<any>('app/nutrient', { params: data });
}

// 创建营养素
export async function $createnutr(data: any) {
  return requestClient.post<any>('app/nutrient', data);
}

// 更新营养素
export async function $updatenutr(data: any, id: any) {
  return requestClient.put<any>(`app/nutrient/${id}`, data);
}

//删除营养素
export async function $deletenutr(data: any, id: any) {
  return requestClient.delete<any>(`app/nutrient/${id}`, { params: data });
}

// 获取单位列表
export async function $getunitlist(data: any) {
  return requestClient.get<any>('app/nutrient/unit-list', { params: data });
}




// 知识列表
export async function $getmaterlist(data: any) {
  return requestClient.get<any>('app/knowledge', { params: data });
}

// 创建知识
export async function $createmater(data: any) {
  return requestClient.post<any>('app/knowledge', data);
}

// 更新知识
export async function $updatemater(data: any, id: any) {
  return requestClient.put<any>(`app/knowledge/${id}`, data);
}

// 删除知识
export async function $deletematewr(data: any, id: any) {
  return requestClient.delete<any>(`app/knowledge/${id}`, { params: data });
}

// 获取知识详情
export async function $getmaterdesc(id: any, data: any) {
  return requestClient.get<any>(`app/knowledge/${id}`, { params: data });
}
